import Vue from 'vue'
import 'mavon-editor/dist/css/index.css'
import mavonEditor from 'mavon-editor'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import VueParticles from 'vue-particles'
import axios from 'axios'

//在request拦截器中
setInterval(() => {
    axios.interceptors.request.use(config => {
        // console.log(config)
        config.headers['username'] = window.sessionStorage.getItem('username')
        return config
    })
}, 1000);

// axios.interceptors.response.use(config => {
//     console.log(config)
//     return config
// })

import {
    Form,
    FormItem,
    Input,
    Button,
    Container,
    Header,
    Aside,
    Main,
    Menu,
    Submenu,
    MenuItem,
    MenuItemGroup,
} from 'element-ui'
Vue.config.productionTip = false

Vue.use(mavonEditor)



Vue.use(VueParticles)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Button)
Vue.use(Container)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)


new Vue({
    router,
    render: h => h(App)
}).$mount('#app')